import axios from 'axios';

const instance = axios.create({
    baseURL: 'https://11b3290d.r16.cpolar.top', // 统一请求IP和端口
});

instance.interceptors.request.use(config => {
    const token = localStorage.getItem('satoken');
    if (token) {
        config.headers['satoken'] = token;
    }
    return config;
}, error => Promise.reject(error));

export default instance;
